package com.bucg.cjcloud.gb28181.sip.process;

import com.bucg.cjcloud.gb28181.sip.modle.ResponseModel;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.sip.message.Request;

/**
 * 最后处理
 * */
@Order
@Component
public class OkStatusRequestProcess implements RequestProcess  {


    @Override
    public ResponseModel processRequest(Request req, String cmdType) {
        // 如果是alarm 忽略
        if (!cmdType.equalsIgnoreCase("alarm"))
            System.out.println(new String(req.getRawContent()));
        return ResponseModel.builder().statusCode(200).build();
    }

    @Override
    public boolean isSupport(Request req, String cmdType) {

        return true;
    }

}
